<?php
error_reporting(0);

	global $_W,$_GPC;
	set_time_limit(0);
	$f=$_GPC['f'];
	$l=$_GPC['l'];
	$order_list=pdo_fetchall('select orderno,openid,goodsname,ptime from'.tablename('tg_order').'where tuan_id=:tuan_id  and  status=1 and bukuanstatus=1 and issettlement=0 and master_orderno is NULL order by id asc limit 10',array(':tuan_id'=>'447197'));
	$i=0;
	foreach($order_list as $item)
						{
		pdo_update('tg_order',array('issettlement'=>1),array('orderno'=>$item['orderno']));					
$i+=1;
							$url = app_url('order/master_orderconfirm', array('master_orderno' => $item['orderno']));
							$openid=$item['openid'];
							$title='【问题已修复,已补款请勿继续操作】';
							$goodsname=$item['goodsname'];
							$orderno=$item['orderno'];
							$datetime=date('Y-m-d H:i',$item['ptime']);
							$remark='请在'.$item['goodsname'].'活动结束之前补齐尾款，过时失效系统将自动退款处理';
							bukuan_notice($openid,$title,$goodsname,$orderno,$datetime,$remark,$url);
						}
						echo $i;
						exit;
	?>
	 